﻿<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<Intranet.Views.ActivityStreamView>" MaintainScrollPositionOnPostback="true" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Home Page
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="HeaderContent" runat="server">
<link type="text/css" href='<%: Url.Content("~/Content/jquery-ui-1.8.22.custom/development-bundle/themes/base/jquery.ui.all.css") %>' rel="Stylesheet" />
<script type="text/javascript" src='<%: Url.Content("~/Content/jquery-ui-1.8.22.custom/development-bundle/ui/jquery.effects.core.js") %>'></script>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
     <a href='<%: Url.Action("Index", new { id = string.Empty })%>'>
    <h2>My activity stream</h2>
    </a>
<div id="myActivities">
    <% Html.RenderPartial("AllActivities", Model.MyActivities); %>
       </div>


    <% using (Ajax.BeginForm("NewParentActivity", "Home", new AjaxOptions { InsertionMode=InsertionMode.Replace, UpdateTargetId="myActivities", OnComplete="clearText" }))
       { %>
<%: Html.ValidationSummary(true)%>
<table>
    <tr class="activityEnter">
        <td>
            <%: Html.HiddenFor(model => model.NewActivity.assignedTo)%>
                <input class="activityTextBox focus" name="NewActivity.details" id="NewActivityDetails" type="text" placeholder="create new activity" />
            <%: Html.ValidationMessageFor(model => model.NewActivity.details)%>
        </td>
        <td class="controls">
            <input type="submit"  value="Create" />
        </td>
    </tr>
</table>
<% } %>
</asp:Content>
